<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>js的事件</title>
		<script>
			const f=100;
			// f=200;
			function sayHello(){
				for (let i = 0; i < 20; i++) {
					document.write(`<h1>好好学习天天向上</h1>`);
				}
			}
			function printHello(str){
				for (let i = 0; i < 20; i++) {
					document.write(`<h1>${str}</h1>`);
				}
			}
		</script>
	</head>
	<body>
		<button type="button"   onclick="sayHello()">决心</button>
		<button type="button" onclick="printHello('我要减肥')">决心2</button>
		
		<button type="button" onclick='printHello("我要减肥")'>决心3</button>
	</body>
</html>